<div >
    <button *ngIf="type ==2" nz-button [nzType]="'primary'" (click)="addModal()"><span>新增</span></button>
    <nz-table #basicTable [nzData]="behalfs">
        <thead>
          <tr>
            <th>代办名称</th>
            <th>内容</th>
            <th>创建时间</th>
            <th>创建人</th>
            <th>是否完成</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of basicTable.data">
            <td>{{data.title}}</td>
            <td>{{data.content}}</td>
            <td>{{data.createTime}}</td>
            <td>{{data.createName}}</td>
            <td>
                <label nz-checkbox [(ngModel)]="data.isComplete" ngDefaultControl></label>
            </td>
            <td>
              <button nz-button [nzType]="'primary'" (click)="detailModal(data)"><span>查看</span></button>
              <button nz-button [nzType]="'primary'" (click)="delete(data)" nzDanger><span>删除</span></button>
            </td>
          </tr>
        </tbody>
       
      </nz-table>
</div>

<nz-modal [(nzVisible)]="isVisible" [nzTitle]='title' (nzOnCancel)="controlShow()" (nzOnOk)="controlShow()">
    <ng-container *nzModalContent>
        <div class="l-flex">
            <label for="search-title">代办名称  </label>
            <input nz-input placeholder="请输入代办名称" id="search-title" [(ngModel)]="modalDetail.title" [disabled]="isSetData" />
        </div>
       <div class="l-flex">
            <label for="search-title">内容  </label>
            <input nz-input placeholder="请输入内容" id="search-title" [(ngModel)]="modalDetail.content" [disabled]="isSetData" />
       </div>
       <div class="l-flex">
            <label for="search-title">创建时间  </label>
            <input nz-input placeholder="请输入创建时间" id="search-title" [(ngModel)]="modalDetail.createTime" [disabled]="isSetData" />
        </div>
       <div class="l-flex">
            <label for="search-title">创建人  </label>
            <input nz-input placeholder="请输入创建人" id="search-title" [(ngModel)]="modalDetail.createName" [disabled]="isSetData" />
       </div>
        <div class="l-flex">
            <label for="search-title">权重  </label>
            <input nz-input placeholder="请输入权重" id="search-title" [(ngModel)]="modalDetail.weight" [disabled]="isSetData" />
        </div>
       <button  *ngIf="type ==2" nz-button [nzType]="'primary'" (click)="commit()"><span>提交</span></button>
    </ng-container>
</nz-modal>
